CFLAGS = -O3 -iquote ../lib
lp = ../lib/
lib = ${lp}netopt.o ${lp}hires.o ${lp}ts.o


stress: stress.cpp sockets.o
	c++ -o stress ${CFLAGS} ${lib} stress.cpp sockets.o

sockets.o: sockets.h

clean:
	rm -f *.o stress
test: all
	./stress

all: stress.cpp sockets.c
	c++ -O3 -iquote ../lib -o stress stress.cpp sockets.c ../lib/netopt.c  ../lib/hires.c ../lib/ts.c
	
tsock: tsock.cpp sockets.c
	c++ -O3 -iquote ../lib -o tsock tsock.cpp sockets.c ../lib/netopt.c  ../lib/hires.c ../lib/ts.c

st-jb2: st-jb2.cpp sockets.c
	c++ -O3 -iquote ../lib -o st-jb2 st-jb2.cpp sockets.c ../lib/netopt.c  ../lib/hires.c ../lib/ts.c
